# # include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


# set(protofiles "storage.proto")
# set(cur_path "${CMAKE_CURRENT_BINARY_DIR}")
# set(src_path ${CMAKE_CURRENT_LIST_DIR})
# set(proto_path ${CMAKE_SOURCE_DIR}/src/protos)
# set(source_dir ${CMAKE_SOURCE_DIR}/build/src/storage.pb.cc)

# set(src_list "")
# foreach(file  ${protofiles})
# # compile protobuf file 
#     set(hfile "")
#     set(sfile "")
#     string(REPLACE ".proto" ".pb.h" hfile ${file}) # user.pb.h
#     string(REPLACE ".proto" ".pb.cc" sfile ${file}) # user.pb.cc
#     if(NOT EXISTS ${cur_path}/${sfile}) 
#         add_custom_command(
#             PRE_BUILD
#             COMMAND protoc
#             ARGS -I ${proto_path} --cpp_out=${cur_path} ${proto_path}/${file}
#             DEPENDS ${proto_path}/${file}
#             OUTPUT ${cur_path}/${sfile}
#             COMMENT "proto compile: " ${file}
#         )
#     endif()
#     list(APPEND src_list ${cur_path}/${sfile})
# endforeach()

# file(GLOB SRC_FILES ${CMAKE_CURRENT_LIST_DIR}/*.cc)

# add_executable(file_storage ${SRC_FILES} ${src_list})
# target_include_directories(file_storage PUBLIC ${cur_path})
# target_link_libraries(file_storage PUBLIC brpc_etcd)
